package com.tedu.bill;

/**
 * Author：毕龙
 * Date: 2024/3/17 16:47
 */
public class TestOperatorLogic1 {
    public static void main(String[] args) {

        System.out.println(true & true);//true
        System.out.println(true & false);//false
        System.out.println(false & true);//false
        System.out.println(false & false);//false

        int a = 10;
        int b = 3;
        System.out.println( a > b & a++ == b);//false
        System.out.println(a);//11

        //测试短路
        System.out.println(a < b & a++ > b++);//false
        System.out.println(a);// 12
        System.out.println(b);//  4

        //0000 0001
        //0000 0010
        //0000 0000
        System.out.println(1 & 2);// 0
        System.out.println(7 & 15);//7
        System.out.println("====================");
        //1111 1111
        //0110 1110
        //1001 0010
        //1001 0010
        //0110 1110
        System.out.println(-1 & -110);//-110
        //0001 0111          0011 0111
        //1110 1001  -23     1100 1001
        //1100 1001
        //0011 0111  -55
        System.out.println(-23 & -55);


    }
}
